
<p>
  <b>Title:</b>
  <%=h @movie.title %>
</p>

<p>
  <b>Description:</b>
  <%=h @movie.description %>
</p>

<p>
  <b>Rating:</b>
  <%=h @movie.rating %>
</p>

<p>
  <b>Released on:</b>
  <%=h @movie.released_on %>
</p>

<p>
	<b>Reviews:</b>
</p>
<p>
	Number of reviews: <%=h @num_reviews %> | Average Score: <%=h @average_score.blank? ? "-" : @average_score %>
</p>
<p>
	<%= render :partial => "review", :collection => @reviews %> 
</p>
<% if logged_in? %>
	<% unless @review.nil? %>
		<%= render :partial => "movie_review_form", :locals => {:movie=>@movie, :review=>@review}%>
	<% end %>
  <%=   link_to 'Edit', edit_movie_path(@movie) %> |
<% end %>
<%=   link_to 'Back', :back %>
